#!/bin/bash
set -e
set -x
MYDIR="${0%/*}"
cd "$MYDIR/.."
source "recipes/common.sh"


# RECIPE START libshell

unset NIL
rm -rf build/libshell
cp -a libshell build/
cd build/libshell

make -j${NPROC} \
	SCDOC=/bin/true \
	bindir=$prefix/bin \
	$NIL

make -j${NPROC} \
	SCDOC=/bin/true \
	DESTDIR=`pwd`/inst \
	bindir=$prefix/bin \
	install-bin install-data \
	$NIL

make -j${NPROC} \
	SCDOC=/bin/true \
	HELP2MAN1=/bin/true \
	DESTDIR=`pwd`/inst \
	bindir=$prefix/bin \
	install-single \
	$NIL

cd inst
find ${prefix#/} | cpio -pumd "$stage"
cd ../../..
rm -rf build/libshell

# RECIPE END libshell
